Skip to content

Conversation

@qnnn
Copy link

@qnnn qnnn commented Mar 20, 2025

Improves TokenTextSplitter with the following changes:

  • Extends findLastPeriodOrPunctuation to support customizable punctuation detection.
  • Ensures the doSplit method respects maxNumChunks limits and avoids premature processing of remaining tokens.
  • Aligns the default values of TokenTextSplitter$Builder with the direct constructor to avoid inconsistency.
  • Adds input validation for parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants